<%@ page import="com.recharge.wk.domain.TradeMerchant" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c"
           uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="auth" uri="http://www.recharge.com/authority" %>

<auth:authority role="0" />
<!DOCTYPE html>
<html>
<head>
    <title>首页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="easyui/themes/default/easyui.css" rel="stylesheet" type="text/css"/>
    <link href="easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
    <script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="js/json2.js" type="text/javascript"></script>
    <script src="easyui/jquery.easyui.min.js" type="text/javascript"></script>

    <script language="JavaScript" type="text/javascript">
        $().ready(function () {


        });

        function clickMenu(clickObj, tabName, url) {
            $(clickObj).css({'background-color': '#FBEC88', 'border': '#000000 solid 1px'})
                    .siblings().css({'background-color': 'white', 'border': 'none'});

            var tab = $('#tabs').tabs('getTab', tabName);
            if (tab) {
                $('#tabs').tabs('select',tabName);
                return;
            }


            $('#tabs').tabs('add', {
                title: tabName,
                selected: true,
                closable: true,
                href: url
            });
        }
    </script>
    <style type="text/css">
        .easyui-accordion ul {
            list-style-type: none;
            margin: 0px;
            padding: 10px;
        }
    </style>
</head>
<body class="easyui-layout" style="overflow-y: hidden" scroll="no">
<noscript>
    <div style="position: absolute; z-index: 100000; height: 2046px; top: 0px; left: 0px;
            width: 100%; background: white; text-align: center;">
        <img src="images/noscript.gif" alt='抱歉，请开启脚本支持！'/>
    </div>
</noscript>
<div region="north" split="true" style="overflow: hidden; height: 50px; background: #D2E0F2 repeat-x center 50%;
        line-height: 20px; color: #fff; text-align: right">
    <%
        if (session.getAttribute("LOGIN_KEY")!=null){
            out.print(((TradeMerchant )session.getAttribute("LOGIN_KEY")).getMerName());
        }
    %>欢迎使用 <a href="user/loginOut">退出</a>
</div>
<div region="south" style="height: 20px; background: #D2E0F2;">
    <div style="text-align: center; font-weight: bold">
        Recharge WorkOrder 1.0
    </div>
</div>
<div region="west" split="true" title="导航菜单" style="width: 180px;overflow:hidden;" icon="icon-redo">
    <div id="menu" class="easyui-accordion" fit="true" border="false">

        <auth:authority role="1">
            <div id="workOrderManager" title="商品管理" style="overflow:auto; padding: 10px;" icon="icon-edit">
                <div style="height: 24px; text-align: center; line-height: 24px;
            font-weight: bold; margin-bottom: 10px"
                     onclick="clickMenu(this,'商品管理','product/main.jsp');return false;">
                    <a href="">商品管理</a></div>

                <div style="height: 24px; text-align: center; line-height: 24px;
            font-weight: bold; margin-bottom: 10px"
                     onclick="clickMenu(this,'供货关系管理','productSup/main.jsp');return false;">
                    <a href="">供货关系管理</a></div>

                <div style="height: 24px; text-align: center; line-height: 24px;
            font-weight: bold; margin-bottom: 10px"
                     onclick="clickMenu(this,'供货商管理','sup/main.jsp');return false;">
                    <a href="">供货商管理</a></div>
            </div>
            <div id="tradeMerManager" title="商户管理" style="overflow:auto; padding: 10px;" icon="icon-edit">
                <div style="height: 24px; text-align: center; line-height: 24px;
            font-weight: bold; margin-bottom: 10px"
                     onclick="clickMenu(this,'商户价格管理','tradeSaleprice/main.jsp');return false;">
                    <a href="">商户价格管理</a>
                </div>

				<div style="height: 24px; text-align: center; line-height: 24px;
            font-weight: bold; margin-bottom: 10px"
                     onclick="clickMenu(this,'商户余额管理','tradeMerchant/main.jsp');return false;">
                    <a href="">商户余额管理</a></div>
            </div>
        </auth:authority>
        <auth:authority role="0">
            <div id="tradeOrderManager" title="订单管理" style="overflow:auto; padding: 10px;" icon="icon-edit">
                <div style="height: 24px; text-align: center; line-height: 24px;
            font-weight: bold; margin-bottom: 10px"
                     onclick="clickMenu(this,'订单管理','tradeOrder/main.jsp');return false;">
                    <a href="">订单管理</a>
                </div>
            </div>
        </auth:authority>
    </div>

</div>

<div region="center" id="mainPanle" style="background: #eee;overflow:hidden;">
    <div id="tabs" class="easyui-tabs" fit="true" border="false" style="overflow:hidden">
        <div title="主页" style="padding: 20px;" id="home">
            <h1>
                Welcome...</h1>
        </div>
    </div>
</div>
</body>
</html>